<table>
  <tr>
    <th>Login</th>
    <td><%= form.text_field :login %></td>
  </tr>
  <tr>
    <th>First Name</th>
    <td><%= form.text_field :first_name %></td>
  </tr>
  <tr>
    <th>Last Name</th>
    <td><%= form.text_field :last_name %></td>
  </tr>
  <tr>
    <th>Email</th>
    <td><%= form.text_field :email %></td>
  </tr>
  <tr>
    <th>Password</th>
    <td><%= form.password_field :password %></td>  
  </tr>
  <tr>
    <th>Confirm Password</th>
    <td><%= form.password_field :password_confirmation %></td>
  </tr>
</table>
<br/>
<h4>Check all roles which apply:</h4>
<% Group.find(:all).each do |group| -%>
		<input type="checkbox" name="groups[]" id="groups_<%= group.id %>" value="<%= group.id %>" <%= checked?(user && user.groups.include?(group)) %> />
		<label for="groups_<%= group.id %>"><%= group.name %></label>
 <% end -%>
<p><%= submit_tag 'Save' %></p>
